import sqlite3

connect = sqlite3.connect('database.db')
cursor = connect.cursor()
key = '爱'
sql_str = r'''
    SELECT word,spell FROM word WHERE word LIKE '%%%s%%'
''' % (key)
cursor.execute(sql_str)
print(cursor.fetchall())
